package 如何初始化数组;

import java.util.Arrays;

public class 数组反转15 {
	public static void main(String[] args) {
		int[] a = new int[5];
        for(int i=0;i<5;i++) {
            a[i] = (int)(Math.random()*100);
        }
        System.out.println(Arrays.toString(a));
        for(int l=0;l<(a.length)/2;l++) {
            int b;
            b = a[l];
            a[l] = a[a.length-1-l];
            a[a.length-1-l] = b;
        }
        System.out.println(Arrays.toString(a));
    }
}